package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.OrderGoodsDetail;
import com.micro.modual.model.bo.ordergoodsdetail.OrderGoodsDetailBO;

/**
 * <h1>订单商品详情表 延展类</h1>
 *
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class OrderGoodsDetailExtension {

    /**
     * <h2>转换: 订单商品详情表 新增</h2>
     *
     * @param orderGoodsDetailBO {@link OrderGoodsDetailBO} 订单商品详情表 新增/修改 请求对象
     * @return {@link OrderGoodsDetail} 订单商品详情表
     */
    public static OrderGoodsDetail converAddOrderGoodsDetail(OrderGoodsDetailBO orderGoodsDetailBO) {
        OrderGoodsDetail orderGoodsDetail = new OrderGoodsDetail();
        orderGoodsDetail.setId(SnowFlakeUtil.getId());
        return orderGoodsDetail;
    }

    /**
     * <h2>转换: 订单商品详情表 修改</h2>
     *
     * @param orderGoodsDetailBO {@link OrderGoodsDetailBO} 订单商品详情表 新增/修改 请求对象
     * @return {@link OrderGoodsDetail} 订单商品详情表
     */
    public static OrderGoodsDetail converEditOrderGoodsDetail(OrderGoodsDetailBO orderGoodsDetailBO) {
        OrderGoodsDetail orderGoodsDetail = new OrderGoodsDetail();
        orderGoodsDetail.setId(orderGoodsDetailBO.getId());
        return orderGoodsDetail;
    }
}
